remus: Only build kernel module if parent kernel has IMQ configured.
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 8 Feb 2010 08:41:51 +0000 (08:41 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 8 Feb 2010 08:41:51 +0000 (08:41 +0000)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
tools/remus/kmod/Makefile

index bc4eaf4d6a1f38c3fa9ee11824c0ae38151ecdfc..46f474aa3aa9eadcc13622900b8dee2161f3b181 100644 (file)
@@ -14,11 +14,11 @@ KERNELDIR ?= $(XEN_ROOT)/build-linux-$(LINUX_VER)_$(XEN_TARGET_ARCH)
 
 .PHONY: all
 all:
-       if test -d $(KERNELDIR); then $(MAKE) -C $(KERNELDIR) SUBDIRS=`pwd` modules; fi
+       if test -d $(KERNELDIR) && grep -q ^CONFIG_IMQ= $(KERNELDIR)/.config 2>/dev/null; then $(MAKE) -C $(KERNELDIR) SUBDIRS=`pwd` modules; fi
 
 .PHONY: install
 install: all
-       if test -d $(KERNELDIR); then $(MAKE) -C $(KERNELDIR) SUBDIRS=`pwd` INSTALL_MOD_PATH=$(DESTDIR) modules_install; fi
+       if test -d $(KERNELDIR) && grep -q ^CONFIG_IMQ= $(KERNELDIR)/.config 2>/dev/null; then $(MAKE) -C $(KERNELDIR) SUBDIRS=`pwd` INSTALL_MOD_PATH=$(DESTDIR) modules_install; fi
 
 clean::
        -rm -rf *.o *.ko *.mod.c *.mod.o Module.symvers .*.cmd .tmp_versions